/**
 * org.assess.oa.system.dao.impl.TbMenuItemDAOImpl
 */
package org.assess.oa.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.assess.core.dao.BaseDAOImpl;
import org.assess.oa.system.bean.TbMenuItem;
import org.assess.oa.system.dao.TbMenuItemDAO;

/**
 * @description 操作菜单项表的DAO层实现类
 * @author XiaLongxiang
 * @createtime 2012-6-5 上午9:44:54
 */
public class TbMenuItemDAOImpl extends BaseDAOImpl<TbMenuItem> implements TbMenuItemDAO {
    public TbMenuItem queryTbMenuItemById(String menuitem_id) {
        return (TbMenuItem) sqlClient.queryForObject("queryTbMenuItemById", menuitem_id);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenuItem> queryTbMenuItemAsList(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuItemAsList", parameters);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenuItem> queryTbMenuItemAsPermissionList(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuItemAsPermissionList", parameters);
    }
    
    @SuppressWarnings("unchecked")
    public List<TbMenuItem> queryTbMenuItemAsListByUserAndSystem(Map<String, Object> parameters) {
        return sqlClient.queryForList("queryTbMenuItemAsListByUserAndSystem", parameters);
    }
    
    public boolean deleteTbMenuItemById(String menuitem_id) {
        sqlClient.delete("deleteTbMenuItemById", menuitem_id);
        return true;
    }
    
    public boolean deleteTbMenuItemByMenuId(String menu_id) {
        sqlClient.delete("deleteTbMenuItemByMenuId", menu_id);
        return true;
    }
}
